use std::collections::HashMap;
pub fn main() {
    let mut string_map:HashMap<&str,i32> = HashMap::new();
    string_map.insert("alice", 10);
    string_map.insert("bob", 20);
    println!("{:#?}",string_map);
    // string_map.remove("bob"); // 删除key
    match string_map.get(&"bob") {
        Some(item) => println!("HashMap的值{}",item),
        _ => println!("没有获取到HashMap的值")
    }

    for pat in string_map.into_iter() {
        println!("HashMap的key{},HashMap的value{}",pat.0,pat.1);
    }
}